package com.zhou.cloud.consume.config;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.KafkaListener;

/**
 * @descrition:
 * @author: zhouyongjun
 * @date: 2022/7/29
 **/
@Configuration
@Slf4j
public class KafkaConsumeListener {

    @KafkaListener(topics = "topic1")
    public void onMessage(ConsumerRecord<?, ?>  record){
        log.warn("简单消费1：topic={},partition={},message={}",record.topic(),record.partition(),record.value());
    }

}
